#!/user/bin/env python3
# -*- coding: utf-8 -*-

#基类，
from selenium import webdriver
class BasePage:
    #driver=webdriver.Chrome()
    #构造函数  初始化
    def __init__(self,driver):
        self.driver=driver
        self.driver.implicitly_wait(5)


    def open(self,url):#
        self.driver.get(url)

    def locate(self,by,value):#定位
        return  self.driver.find_element(by,value)

    def input(self,by,value,txt):#输入
        self.locate(by,value).send_keys(txt)

    def click(self,by,value):#点击
        self.locate(by,value).click()




# if __name__=='__main__':
#     Base_Page=Base_Page()
#     url = 'https://www.baidu.com/'
#     Base_Page.open(url)
